package com.gln.bloger.dao;

import java.util.Date;
import java.util.List;

import com.gln.bloger.exception.BlogerException;
import com.gln.bloger.pojos.Category;
import com.gln.bloger.pojos.Entry;
import com.gln.bloger.pojos.Website;

/**
 * illustrate functions which should be implemented
 * @author renxj
 *
 */
public interface EntryDao extends BaseDao<Entry>{
	/**
	 * get entries for guest
	 * @param website
	 * @return
	 * @throws BlogerException
	 */
	public List<Entry> getEntries(Website website) throws BlogerException;
	/**
	 * 
	 * @param category
	 * @return
	 * @throws BlogerException
	 */
	public List<Entry> getEntries(Website website, Category category) throws BlogerException;
	/**
	 * 
	 * @param website
	 * @param tag
	 * @return
	 * @throws BlogerException
	 */
	public List<Entry> getEntries(Website website, String tagId) throws BlogerException;
	/**
	 * get all entries for author
	 * @param website
	 * @return
	 * @throws BlogerException
	 */
	public List<Entry> getAllEntries(Website website) throws BlogerException;
	/**
	 * get recent Entries
	 * @param website
	 * @return
	 * @throws BlogerException
	 */
	public List<Entry> getRecentEntries(Website website, int size) throws BlogerException;
    /**
     * get previous entry
     * @param website
     * @param id
     * @return
     * @throws BlogerException
     */
	public Entry getPreviousEntry(Website website ,String id) throws BlogerException;
	/**
	 * get next entry
	 * @param website
	 * @param id
	 * @return
	 * @throws BlogerException
	 */
	public Entry getNextEntry(Website website, String id) throws BlogerException;
	/**
	 * get related entries
	 * @param website
	 * @param entry
	 * @return
	 * @throws BlogerException
	 */
	public List<Entry> getRelatedEntries(Website website, Entry entry, int size) throws BlogerException;
	/**
	 * get entries by entry
	 * @param website
	 * @param entry
	 * @return
	 * @throws BlogerException
	 */
	public List<Entry> getEntriesByMonth(Website website, Date month) throws BlogerException;
	/**
	 * get archived month list
	 * @param website
	 * @return
	 * @throws BlogerException
	 */
	public List<Date> getArchivedMonthList(Website website) throws BlogerException;
}
